import type { AddCarParams, AreaList, AreaPage, CarDetail, UpdateCarParams } from "@/types/car"
import { request } from "@/utils/reuqest"

export const getAreaListAPI=(data:AreaPage)=>{
  return request<AreaList>('/parking/card/list','GET',data)
} 
export const addCarAPI=(data:AddCarParams)=>{
  return request('parking/card','POST',data)
}
export const updateCarAPI=(data:UpdateCarParams)=>{
  return request('parking/card/edit','PUT',data)
}
export const getCarDetailAPI=(id:string)=>{
  return request<CarDetail>(`parking/card/detail/${id}`,'GET')
}
export const deleteCarAPI=(id:string)=>{
  return request(`parking/card/${id}`,'DELETE')
}